package com.hlw.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.hlw.entity.Menu;

/**
 * <p>
 * 菜单表 Mapper 接口
 * </p>
 *
 * @author Mht
 * @since 2020-05-02
 */
@Mapper
public interface MenuMapper extends BaseMapper<Menu>{
	List<Menu> getmenuListByPId(@Param("pid") Integer pid);
    List<Menu> getmenuByPid();
    @Select("select * from sys_menu")
    List<Menu> getMenus(); 
  //根据角色ID查询角色对应的权限信息
    List<Menu> findPermissionByRoleId(@Param("roleId") Integer roleId);
    
	Integer inserPerByRid(@Param("rid")Integer rid,@Param("mid")Integer mid);

    
    //删除角色权限表
    Integer deletePerByRid(Integer rid);
    
    //根绝菜单ID删除角色权限表
    Integer deletePerByMid(Integer mid);


}
